package com.xmy.cultivate.mapper;

import com.xmy.cultivate.entity.OrganizationDepartmentPrincipal;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 部门负责人详情 Mapper 接口
 * </p>
 *
 * @author hpiggy
 * @since 2025-05-27
 */
public interface OrganizationDepartmentPrincipalMapper extends BaseMapper<OrganizationDepartmentPrincipal> {

    @Select("SELECT * FROM organization_department_principal WHERE year_part = ${yearPart} AND quarter_num = ${quarterNum} AND school_id = ${schoolId} AND department_id = 23 AND duty_id = 1 AND is_current = 1 LIMIT 1")
    OrganizationDepartmentPrincipal getPrincipalByDepartmentId(@Param("yearPart") Integer yearPart, @Param("quarterNum") Integer quarterNum, @Param("schoolId") Long schoolId);

}
